package com.test.mylotterysystem.comment.errorCode;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
public enum ServiceErrorCode implements ErrorCode {
    //  -----------------------  用户注册模块  -----------------------
    USER_INFO_IS_EMPTY(100, "用户注册信息为空"),
    USER_NAME_HAS_EXIST(101, "用户名已经存在"),
    MAIL_FORMAT_IS_ERROR(102, "邮箱格式错误"),
    MAIL_HAS_EXIST(103, "邮箱已经存在"),
    PHONE_FORMAT_IS_ERROR(104, "手机号格式错误"),
    PHONE_HAS_EXIST(105, "手机号已经存在"),
    PASSWORD_FORMAT_IS_ERROR(106, "密码格式错误"),
    USER_IDENTITY_IS_ERROR(107, "用户身份错误"),


    //  -----------------------  用户登录模块  -----------------------
    USER_LOGIN_INFO_IS_EMPTY(200, "用户登录信息为空"),
    USER_LOGIN_PARAM_TYPE_IS_ERROR(201, "用户登录类型有误"),
    USER_NOT_EXIST(202, "用户不存在"),
    USER_PASSWORD_IS_ERROR(203, "登录密码错误"),
    USER_IDENTITY_IS_NOT_ADMIN(204, "用户身份不为ADMIN"),
    USER_VERIFICATION_CODE_IS_ERROR(205, "验证码错误"),


    //  -----------------------  用户列表模块  -----------------------
    USER_FIND_IDENTITY_IS_ERROR(300, "用户查询身份信息异常"),


    //  -----------------------  奖品创建模块  -----------------------
    PRIZE_PARAM_IS_EMPTY(400, "奖品参数为空"),
    PRIZE_PICTURE_IS_EMPTY(401, "创建奖品图片为空"),


    //  -----------------------  活动创建模块  -----------------------
    ACTIVITY_PARAM_IS_EMPTY(500,"奖品参数为空"),
    USER_ID_NOT_EXIST(501,"选取的用户中有用户不存在"),
    PRIZE_ID_NOT_EXIST(502,"选取的奖品中有奖品不存在"),
    PRIZE_NUMBER_BIGGER_THAN_USER_NUMBER(503,"奖品数量大于人员数量"),
    CREATE_ACTIVITY_DETAIL_IS_ERROR(504,"整合信息为空"),


    //  -----------------------  抽奖模块  -----------------------
    DRAW_PRIZE_PARAM_IS_EMPTY(600,"抽奖参数为空"),
    RABBIT_MQ_MESSAGE_IS_EMPTY(601,"rabbitMQ中接收的数据为空"),
    ;

    private Integer code;
    private String errorMsg;

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getErrorMsg() {
        return errorMsg;
    }
}
